GError **error)
{
GdkGLContext *share = gdk_gl_context_get_shared_context (context);
+ GdkGLContext *shared_data_context;
GdkWin32GLContext *context_win32 = GDK_WIN32_GL_CONTEXT (context);
gboolean debug_bit, compat_bit, legacy_bit;
gdk_gl_context_get_required_version (context, &major, &minor);
debug_bit = gdk_gl_context_get_debug_enabled (context);
compat_bit = gdk_gl_context_get_forward_compatible (context);
+ shared_data_context = gdk_surface_get_shared_data_gl_context (surface);
/*
* A legacy context cannot be shared with core profile ones, so this means we
legacy_bit ? "yes" : "no"));
hglrc = _create_gl_context (context_win32->gl_hdc,
- share,
+ share ? share : shared_data_context,
flags,
major,
minor,
ctx = _create_egl_context (win32_display->egl_disp,
context_win32->egl_config,
- share,
+ share ? share : shared_data_context,
flags,
major,
minor,